package SocketTest;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.InputStream;
import java.util.Scanner;

public class Listener implements ActionListener {
    Scanner sc;
    Listener(InputStream in){
       super();
       this.sc = new Scanner(in);
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        System.out.println("message from:" + sc.nextLine());
    }
}

